export interface ResponseData {
   code: number,
   message: string,
   ok: boolean
}

// 定义SKU对象的ts类型
export interface Attr { //平台属性的收集
   attrId: string | number,   //平台属性的id
   valueId: string | number,  //属性值的id
   id?: string | number,
   valueName?: string,
}
export interface saleAttr {   //销售属性的收集
   saleAttrId: string | number,  //属性id
   saleAttrValueId: string | number,   //属性值id
   id?: number,
   saleAttrValueName: string
}
export interface skuImage {
   id: number,
   imgName: string,
   imgUrl: string,
   isDefault: string,
   skuId: number,
   spuImgId: number
}
export interface SkuData {
   category3Id?: string | number, //三级分类的id
   spuId?: string | number, //已有的SPU的id
   tmId?: string | number, //SPU品牌的id
   skuName?: string,  //sku的名字
   price?: string | number, //sku价格
   weight?: string | number,   //sku重量
   skuDesc?: string,  //sku的描述
   skuAttrValueList?: Attr[],
   skuSaleAttrValueList?: saleAttr[],
   skuDefaultImg?: string,   //sku图片地址
   isSale?: number,  //控制商品的上架和下架
   id?: number,
   skuImageList?: skuImage[]
}
// 获取sku接口返回数据的ts类型
export interface SkuListResponseData extends ResponseData {
   data: {
      records: SkuData[],
      total: number,
      size: number,
      current: number,
      orders: [],
      optimizeCountSql: boolean,
      hitCount: boolean,
      countId: null,
      maxLimit: null,
      searchCount: boolean,
      pages: number
   }
}
// 获取sku商品详情接口的ts类型
export interface SkuInfoResponseData extends ResponseData {
   data: SkuData
}